Skip to main content

go-lint 代码检查工具

go-lint 代码检查工具

go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
sudo apt remove php7.4-fpm

如果golangci-lint莫名出错,执行

sudo apt install xorg-dev
golangci-lint version
cd game/wmap/internal/mapdbg/route/
ubuntu@ubuntu-dev:~/gs/game/wmap/internal/mapdbg/route$ go build
# pkg-config --cflags -- gl gl
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gl' found
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gl' found
pkg-config: exit status 1
# github.com/go-gl/glfw/v3.3/glfw
In file included from ./glfw/src/internal.h:188,
from ./glfw/src/context.c:30,
from ../../../../../vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw.go:4:
./glfw/src/x11_platform.h:33:10: fatal error: X11/Xlib.h: No such file or directory
33 | #include <X11/Xlib.h>
| ^~~~~~~~~~~~
compilation terminated.
sudo apt install xorg-dev